package com.dcy.znoa.common.task;

import com.dcy.znoa.common.util.DateUtil;
import com.dcy.znoa.dao.publiz.MessNoticeDao;
import com.dcy.znoa.dao.publiz.MessageDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Date;

@Slf4j
@Component
public class DelReadMsgTask implements ScheduledTask {

    @Resource
    MessNoticeDao messNoticeDao;
    @Resource
    MessageDao messageDao;

//    @Scheduled(cron="0 0 2 * * ?")
    @Transactional
    @Override
    public void execute() {
        String now = DateUtil.getFormatNowDate1();
        log.info("NotHitTask execute start ,date = " + now);
//        messageDao.insert();
        log.info("NotHitTask execute end ,date = " + now);
    }
}
